package com.atlin.project.service;


import com.atlin.project.model.domain.BiProductsOrder;
import com.atlin.project.model.domain.SysUser;
import com.atlin.project.model.dto.biProduces.BiProductsOrderQueryRequest;
import com.atlin.project.model.enums.biProduces.BiProductsOrderStatusEnum;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * @author atlin
 * @description 针对表【bi_products_order(BI商品订单表)】的数据库操作Service
 * @createDate 2024-11-25 16:25:56
 */
public interface BiProductsOrderService extends IService<BiProductsOrder> {

    /**
     * 下单产品
     *
     * @param productsId 产品Id
     * @param sysUser    下单用户
     */
    String placeAnOrder(Long productsId, SysUser sysUser);

    /**
     * 支付回调处理
     *
     * @param biProductsOrderId
     * @param biProductsOrderStatusEnum
     */
    void paymentHandle(Long biProductsOrderId, BiProductsOrderStatusEnum biProductsOrderStatusEnum);

    /**
     * 支付回调处理
     *
     * @param biProductsOrderId         订单号
     * @param tradeNo                   支付宝订单号
     * @param biProductsOrderStatusEnum 支付状态
     */
    void paymentHandle(Long biProductsOrderId, String tradeNo, BiProductsOrderStatusEnum biProductsOrderStatusEnum);

    /**
     * 获取查询条件
     *
     * @param questionQueryRequest
     * @return
     */
    QueryWrapper<BiProductsOrder> getQueryWrapper(BiProductsOrderQueryRequest questionQueryRequest);
}
